package com.eric.domain.po;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 所在地，用于存储仓库、项目所在地
 * </p>
 *
 * @author 新哥
 * @since 2024-03-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("location")
public class Location implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键、唯一，自增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /*
    * sys_user表的id
    *
    * */
    @TableField("user_id")
    private Integer userId;

    /*
    * projectInfo表的id
    *
    * */
    @TableField("project_id")
    private Integer projectId;

    /*
    * warehouse表的id
    *
    * */
    @TableField("warehouse_id")
    private Integer warehouseId;

    /**
     * 总部、仓库、项目地址
     */
    @TableField("location_address")
    private String locationAddress;

    /**
     * 简述
     */
    @TableField("description")
    private String description;

    @TableField("user_name")
    private String userName;

    @TableField("real_name")
    private String realName;

    @TableField("project_name")
    private String projectName;

    @TableField("warehouse_name")
    private String warehouseName;


    /**
     * 乐观锁，默认为1
     */
    @TableField("version")
    @Version
    private Integer version;

    /**
     * 删除标志，默认值为0，删除状态为1
     */
    @TableField("deleted")
    @TableLogic
    private Integer deleted;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 最后修改时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
